import DTable from "./package/DTable/src";
import FormParsing from "./package/FormParsing/src"
import CheckBox from "./package/checkbox/src";
import DRadio from './package/DRadio/src'
import DSelect from './package/DSelect/src'

const version = "0.0.1";
const components = [DTable,FormParsing,CheckBox,DRadio,DSelect];
const install = (Vue:any,opts = {}) =>{
  //判断是否安装
  //@ts-ignore
  if (install.installed) return;

  components.forEach((component) => {
    Vue.component(component.name, component);
  });
}
//@ts-ignore
if (typeof window !== "undefined" && window.Vue) {
  //@ts-ignore
  install(window.Vue);
}

export default { version, install };